#!/usr/bin/env bash
#
# Run this shell script if you would like to automatically install ysmgr.sh and
# create a pretty command link in the default location.
#
# EXAMPLE:
#
#   [user:-bash]$ ./install_ysmgr
#
echo
echo "Automatically installing YSMGR..."
echo

echo "    ...moving ./ysmgr.sh to ~/bin/ysmgr.sh"
mkdir -pv ~/bin
cp ./ysmgr.sh ~/bin/ysmgr.sh

echo "    ...creating soft link ~/bin/ysmgr to ~/bin/ysmgr.sh"
ln -s ~/bin/ysmgr.sh ~/bin/ysmgr

echo "    ...setting permissions to 755 (rwxr-xr-x)"
chmod 755 ~/bin/ysmgr.sh ~/bin/ysmgr

echo "    ...done!"
echo
echo "Be sure that ~/bin/ is included in your path. Here's an example entry you"
echo "may place in your ~/.profile to effect that:"
echo "  export PATH=.:..:~/bin:${PATH}"
echo
echo "exiting... goodbye!"
echo
